<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
	<link href="<%=request.getContextPath() %>/css/style.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery-1.7.2.js"></script>  
	<script type="text/javascript">  
    i = 1;  
    j = 1;  
    $(document).ready(function(){  
          
        $("#btn_add1").click(function(){  
            document.getElementById("newUpload1").innerHTML+='<div id="div_'+i+'"><input  name="file" type="file"  /><input type="button" value="删除"  onclick="del_1('+i+')"/></div>';  
              i = i + 1;  
        });  
          
        $("#btn_add2").click(function(){  
            document.getElementById("newUpload2").innerHTML+='<div id="div_'+j+'"><input  name="file_'+j+'" type="file"  /><input type="button" value="删除"  onclick="del_2('+j+')"/></div>';  
              j = j + 1;  
        });  
    });  
  
    function del_1(o){  
     document.getElementById("newUpload1").removeChild(document.getElementById("div_"+o));  
    }  
      
    function del_2(o){  
         document.getElementById("newUpload2").removeChild(document.getElementById("div_"+o));  
    }  
  
</script>  
</head>

<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="">首页</a></li>
    <li><a href="">表单</a></li>
    </ul>
    </div>
    <div class="formbody">
    <div class="formtitle"><span>基本信息</span></div>
    <form action="<%=basePath%>mountinformation/threeFile" method="post" enctype="multipart/form-data">
    <ul class="forminfo">
     <li><label>产品大图片</label><input name="file"  type="file" class="dfinput" /><i></i></li>
    <li><label>标题</label><input name="title"  type="text" class="dfinput" /><i></i></li>
      <div id="newUpload1">  
	   <li><label>产品小图片</label><input name="file"  type="file" class="dfinput" /><i></i></li>
   </div>
   <input type="button" id="btn_add1" value="增加一行" >  
 	<li><label>产品价格</label><input name="price"  type="text" class="dfinput" /><i></i></li>
 	<li><label>产品大类别</label><cite>
		<select name="pid">
			<option selected="selected" value="0">代茶饮</option>
			<option selected="selected" value="1">食品</option>
			<option selected="selected" value="2">保健品</option>
			<option selected="selected" value="3">康复仪器</option>

		</select>
  </cite></li>
    <li><label>介绍</label><textarea name="content"  class="textinput"></textarea></li>
    <li><label>&nbsp;</label><input type="submit" class="btn" value="确认保存"/></li>
    </ul>
  </form>
    </div>
  
     <script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	</script>
</body>
</html>
